<template>
    <div style=" width :50%;margin: auto;">


      <el-form ref="form"  :model="form" label-width="100px" >
    <el-form-item  label="OA流水号" prop="oaid">
      <el-input :disabled="true"  v-model="form.oaid"></el-input>
    </el-form-item>
    <el-form-item label="原内容"  prop="content">
      <el-input :disabled="true" v-model="form.content"></el-input>
    </el-form-item>
    <el-form-item label="修改内容" prop="recontent">
      <el-input :disabled="true" v-model="form.recontent"></el-input>
    </el-form-item>
    <el-form-item label="修改时间" prop="date1">
      <el-col :span="11">
        <el-input :disabled="true" v-model="form.setDate"></el-input>
        <!-- <el-date-picker :disabled="true" type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker> -->
      </el-col>


    </el-form-item>

    <el-form-item label="备注" prop="note">
      <el-input :disabled="true" type="textarea" :autosize="{minRows:4}" v-model="form.note"></el-input>
    </el-form-item>
    <el-form-item  label="修改人" prop="name">
      <el-input :disabled="true" v-model="form.name"></el-input>
    </el-form-item>
    <el-form-item>
      <!-- <el-button type="primary" @click="onSubmit('form')">立即创建</el-button>
      <el-button @click="resetForm('form')">重置</el-button> -->

    </el-form-item>
  </el-form>

    </div>

  </template>

  <script>
    export default {
      data() {
        return {
          form: {
            name: '',
            oaid: '',
            setDate: '',

            content: '',
            recontent: '',
            note: ''
          },


        }
      },
      mounted(){
        this.cchcrea()
      },
      methods: {
        cchcrea(){

          if(this.$route.params.context!=null){
            this.$axios({
               url: "/record/selectByid",
               method: "post",
               data:{
                "id":this.$route.params.context
               }
             })
               .then((res) => {

                  // this.form.oaid="123";
                  this.form=res.data.data;

                  console.log(res.data.data)
               })
               .catch((err) => {
                 console.log(err);
               });
          }else{
            alert("参数错误")
          }


        }
      },

    }

  </script>
